package com.chenchao.javacommonclass;

/**
 * @encoding : UTF-8
 * @Time : 2020/11/11 13:06
 * @Author : Chen Chao
 * @File : javaSE.com.chenchao.commonclass.MathTest.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 */
public class MathTest {
    public static void main(String[] args) {
        System.out.println(Math.PI);
        System.out.println(Math.E);
        System.out.println((int)0.5);
        //max()和min()
        System.out.println(Math.max(23,34));
        System.out.println(Math.min(23,34));

        //random()随机数,[0,1)之间
        System.out.println(Math.random());

        //sqrt() ,返回double型
        double r=Math.sqrt(4);
        System.out.println(r);
    }
}
